<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<html>
<head>
<style>
#inline1 {
	display: none;
	width: 600px;
	height: 600px
}

.hiden_value {
	display: none;
}
</style>
<title>khutro.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/userpage.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="css/timkiem.css" type="text/css" />
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css" />
<link href="css/button.css" rel="stylesheet" type="text/css">
<script src="js/scroll-startstop.events.jquery.js"
	type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="all"
	href="css/jquery.fancybox.css">
<script type="text/javascript"
	src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<SCRIPT type="text/javascript" src="js/items.js"></SCRIPT>
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.pack.js"></script>
<style type="text/css">
.ac_over {
	color: white;
	background-color: green;
}
</style>
<script
	src="https://maps.googleapis.com/maps/api/js?sensor=false&language=vi"></script>
<script type="text/javascript">
	jQuery(document).ready(function($) {
		jQuery(".modalbox").fancybox();
	});
	function initialize2() {
		var latitude = document.getElementById("latitude_");
		var longitude = document.getElementById("longitude_");
		var title = document.getElementById("title_");
		var address = document.getElementById("address_");
		var image = document.getElementById("image_");
		var topictypeid = parseInt(document.getElementById("topictypeid_").value);
		var myLatlng = new google.maps.LatLng(latitude.value, longitude.value);
		
		var mapOptions = {
			zoom : 13,
			center : myLatlng,
			disableDefaultUI : true,
			mapTypeId : google.maps.MapTypeId.ROADMAP
		};
		var map = new google.maps.Map(document.getElementById('map'),
				mapOptions);
		if (topictypeid == 1) {
			image = 'Img/home.png';
		} else {
			image = 'Img/home1.png';
		}
		var marker = new google.maps.Marker({
			position : myLatlng,
			map : map,
			title : title.value + ' - ' + address.value,
			icon : image,
			animation : google.maps.Animation.BOUNCE
		});
		google.maps.event.addListener(map, 'tilesloaded', function() {
			google.maps.event.trigger(map, 'resize');
		});
		setMarkers(map);
		setMarkers1(map);
		setMarkers2(map);
		setMarkers3(map);

	}
	function initialize() {

		var latitude = document.getElementById("latitude_");
		var longitude = document.getElementById("longitude_");
		var title = document.getElementById("title_");
		var address = document.getElementById("address_");
		var image = document.getElementById("image_");
		var topictypeid = parseInt(document.getElementById("topictypeid_").value);
		var myLatlng = new google.maps.LatLng(latitude.value, longitude.value);
		
		var mapOptions = {
			zoom : 13,
			center : myLatlng,
			disableDefaultUI : true,
			mapTypeId : google.maps.MapTypeId.ROADMAP
		};
		var map = new google.maps.Map(document.getElementById('minimap'),
				mapOptions);
		if (topictypeid == 1) {
			image = 'Img/home.png';
		} else {
			image = 'Img/home1.png';
		}
		var marker = new google.maps.Marker({
			position : myLatlng,
			map : map,
			title : title.value + ' - ' + address.value,
			icon : image,
			animation : google.maps.Animation.BOUNCE
		});

		setMarkers(map);
		setMarkers1(map);
		setMarkers2(map);
		setMarkers3(map);
	}
	function setMarkers(map) {

		var image = 'Img/university.png';
		var table = document.getElementById('universitiesList');
		if(table!=null){
		var rownum = document.getElementById('Hidden_universitiesList').value;
		var i = parseInt(rownum);
		var total = parseInt(table.rows.length);
		var j = 1;
		for (i, j; i <= total; i++, j++) {
			var latitude = document.getElementById("latitude" + i);
			var longitude = document.getElementById("longitude" + i);
			var title = document.getElementById("locationname" + i);
			var description = document.getElementById("description" + i);
			var myLatlng = new google.maps.LatLng(latitude.value,
					longitude.value);
			var marker = new google.maps.Marker({
				position : myLatlng,
				map : map,
				zIndex : j,
				html : title.value + '\n' + description.value,
				title : title.value,
				icon : image
			});
			google.maps.event.addListener(marker, "click", function() {
				alert(this.html);
			});
		}
		}
	}
	function setMarkers1(map) {

		var image = 'Img/supermarket.png';
		var table = document.getElementById('markertsList');
		if(table!=null){
		var rownum = document.getElementById('Hidden_markertsList').value;
		var i = parseInt(rownum);
		var total = parseInt(table.rows.length);
		var j = 1;
		for (i, j; i <= total; i++, j++) {
			var latitude = document.getElementById("latitude1" + i);
			var longitude = document.getElementById("longitude1" + i);
			var title = document.getElementById("locationname1" + i);
			var description = document.getElementById("description1" + i);
			var myLatlng = new google.maps.LatLng(latitude.value,
					longitude.value);
			var marker = new google.maps.Marker({
				position : myLatlng,
				map : map,
				zIndex : j,
				html : title.value + '\n' + description.value,
				title : title.value,
				icon : image
			});
			google.maps.event.addListener(marker, "click", function() {
				alert(this.html);
			});
		}
		}
	}
	function setMarkers2(map) {

		var image = 'Img/themepark.png';
		var table = document.getElementById('parksList');
		if(table!=null){
		var rownum = document.getElementById('Hidden_parksList').value;
		var i = parseInt(rownum);
		var total = parseInt(table.rows.length);
		var j = 1;
		for (i, j; i <= total; i++, j++) {
			var latitude = document.getElementById("latitude2" + i);
			var longitude = document.getElementById("longitude2" + i);
			var title = document.getElementById("locationname2" + i);
			var description = document.getElementById("description2" + i);
			var myLatlng = new google.maps.LatLng(latitude.value,
					longitude.value);
			var marker = new google.maps.Marker({
				position : myLatlng,
				map : map,
				zIndex : j,
				html : title.value + '\n' + description.value,
				title : title.value,
				icon : image
			});
			google.maps.event.addListener(marker, "click", function() {
				alert(this.html);
			});
		}
		}
	}
	function setMarkers3(map) {

		var image = 'Img/bus.png';
		var table = document.getElementById('busList');
		if(table!=null){
		var rownum = document.getElementById('Hidden_busList').value;
		var i = parseInt(rownum);
		var total = parseInt(table.rows.length);
		var j = 1;
		for (i, j; i <= total; i++, j++) {
			var latitude = document.getElementById("latitude3" + i);
			var longitude = document.getElementById("longitude3" + i);
			var title = document.getElementById("locationname3" + i);
			var description = document.getElementById("description3" + i);
			var myLatlng = new google.maps.LatLng(latitude.value,
					longitude.value);
			var marker = new google.maps.Marker({
				position : myLatlng,
				map : map,
				zIndex : j,
				html : title.value + '\n' + description.value,
				title : title.value,
				icon : image
			});
			google.maps.event.addListener(marker, "click", function() {
				alert(this.html);
			});
		}
		}
	}
</script>
<script type="text/javascript">
	function getcurrenturlvalue(){
		var url = "getCurrentUrl.action";
		var testurl = jQuery('#testurl').val();
		var toRemove = 'http://localhost:8080/FSH_Final/';
		var curUrl = testurl.replace(toRemove,'');
		jQuery.ajax({
			url : url,
			data : {
				curUrl : curUrl 
				
			},
			success : function(data) {
				window.location = "login.jsp";
				
			}
		});
	}
	
</script>
<script type="text/javascript" src="script/jquery.rateit.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheet/rateit.css" />
<link rel="stylesheet" type="text/css" media="all"
	href="stylesheet/styles.css">
<link rel="stylesheet" type="text/css" href="stylesheet/slimbox.css" />
<script type="text/javascript" src="script/mootools-1.2.1-core.js"></script>
<script type="text/javascript" src="script/mootools-1.2-more.js"></script>
<script type="text/javascript" src="script/SlideItMoo.js"></script>
<script type="text/javascript" src="script/slimbox.js"></script>
<script type="text/javascript" src="script/load.js"></script>
<link rel="stylesheet" href="css/stylesconfirm.css">
<script type="text/javascript" src="script/jquery.reveal.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		jQuery('#buttonconfirm').click(function(e) { // Button which will activate our modal
			jQuery('#modal').reveal({ // The item which will be opened with reveal
				animation : 'fade', // fade, fadeAndPop, none
				animationspeed : 300, // how fast animtions are
				closeonbackgroundclick : true, // if you click background will modal close?
				dismissmodalclass : 'close' // the class of a button or element that will close an open modal
			});
			return false;
		});
		jQuery('#buttonconfirm3').click(function(e) { // Button which will activate our modal
			jQuery('#modal3').reveal({ // The item which will be opened with reveal
				animation : 'fade', // fade, fadeAndPop, none
				animationspeed : 300, // how fast animtions are
				closeonbackgroundclick : true, // if you click background will modal close?
				dismissmodalclass : 'close' // the class of a button or element that will close an open modal
			});
			return false;
		});
		jQuery('#buttonconfirm2').click(function(e) { // Button which will activate our modal
			jQuery('#modal2').reveal({ // The item which will be opened with reveal
				animation : 'fade', // fade, fadeAndPop, none
				animationspeed : 300, // how fast animtions are
				closeonbackgroundclick : true, // if you click background will modal close?
				dismissmodalclass : 'close' // the class of a button or element that will close an open modal
			});
			return false;
		});
		// 		jQuery('#buttonconfirm5').click(function(e) { // Button which will activate our modal
		// 			jQuery('#modal5').reveal({ // The item which will be opened with reveal
		// 				animation : 'fade', // fade, fadeAndPop, none
		// 				animationspeed : 300, // how fast animtions are
		// 				closeonbackgroundclick : true, // if you click background will modal close?
		// 				dismissmodalclass : 'close' // the class of a button or element that will close an open modal
		// 			});
		// 			return false;
		// 		});
		// 		jQuery('#buttonconfirm4').click(function(e) { // Button which will activate our modal
		// 			jQuery('#modal4').reveal({ // The item which will be opened with reveal
		// 				animation : 'fade', // fade, fadeAndPop, none
		// 				animationspeed : 300, // how fast animtions are
		// 				closeonbackgroundclick : true, // if you click background will modal close?
		// 				dismissmodalclass : 'close' // the class of a button or element that will close an open modal
		// 			});
		// 			return false;
		// 		});
	});
</script>
<script type="text/javascript" src="js/compare.js"></script>
<style>
#sidebar {
	width: 140px;
	background-color: #FAFAFA;
	margin: 150px 0 15px 0;
	padding: 0px 0px;
	float: left;
	top: 400px;
	left: 0px;
}

#sidebar1 {
	width: 140px;
	background-color: #FAFAFA;
	margin: 150px 0 15px 0;
	padding: 0px 0px;
	float: right;
	top: 400px;
	right: 0px;
}
</style>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
	marginheight="0" onload="initialize()">
	<form action="" id="urlpath" name="urlpath">
		<input id="testurl" type="hidden" value="" />
	</form>
	<script type="text/javascript">
	var path = window.location;
	urlpath.elements["testurl"].value = path;
</script>
	<!-- Save for Web Slices (khutroslide.psd) -->
	<div id="header">
		<div id="headerContent">
			<a href="index.action" id="logo">khutro</a>
			<ul id="menuBar">
				<li><a href="index.action">Trang chủ</a>
				</li>
				<li><a href="help.jsp">Trợ giúp</a>
				</li>
				<li><a href="checkaddtopic.action">Đăng cho thuê</a>
				<li><a href="checkaddsharetopic.action">Đăng chia sẻ</a>
				<li><a href="compareresult.action">So sánh<span
						id="numberCompare" style="color: red; font-size: 12px">(${number})</span>
				</a>
				</li>


				<li><script type="text/javascript">
					function checklogin3() {
						var username = document
								.getElementById("usernamehidden").value;
						if (username == '') {
							// Button which will activate our modal
							jQuery('#modal5').reveal({ // The item which will be opened with reveal
								animation : 'fade', // fade, fadeAndPop, none
								animationspeed : 300, // how fast animtions are
								closeonbackgroundclick : true, // if you click background will modal close?
								dismissmodalclass : 'close' // the class of a button or element that will close an open modal
							});
							return false;

						} else {
							document.profileuser.submit();
						}
					}
				</script>
					<form action="profileuser" name="profileuser"></form> <input
					id="usernamehidden" type="hidden" value="${displayNamess}">
				</li>
			</ul>
			<div id="modal5">
				<div id="heading5">Thông báo !</div>
				<div id="content5">
					<p style="text-align: left; padding-left: 10px; color: black;">Bạn
						cần đăng nhập để sử dụng chức năng này</p>
					<p style="text-align: left; padding-left: 10px; color: black;">Đăng
						nhập với tài khoản của Facebook</p>
					<br /> <a style="text-align: left;" href="javascript:void(0);"
						onclick="getcurrenturlvalue();" class="button1 green close"><img
						src="images/dialog/tick.png">Đăng nhập</a> <a
						style="text-align: left;" href="javascript:void(0);" class="button1 red close"><img
						src="images/dialog/cross.png">Đóng</a>
				</div>
			</div>
			<div id="loginPanel">
				<c:choose>
					<c:when test="${displayNamess!=null}">
						<a class="profileButton" href="profileuser.action">${displayNamess}
						</a>
						<ul>
							<c:choose>
								<c:when test="${userRoleIdss==1}">
									<li><a href="adminloadsystem.action">Trang quản lý</a>
								</c:when>
							</c:choose>
							<li><a href="profileuser.action">Trang cá nhân</a></li><li><a href="changepass.jsp">Đổi mật khẩu</a></li>
							<li><a href="logout.jsp">Thoát</a></li>
						</ul>
					</c:when>
					<c:otherwise>
						<a class="loginButton" href="javascript:void(0);"
							onclick="getcurrenturlvalue();">Đăng nhập</a>
					</c:otherwise>
				</c:choose>
			</div>
			<div id="search">
				<DIV class="search-box">
					<div style="width: 80%; float: left">
						<INPUT id="lookup_input" class="search-bar"
							style="width: 220px; height: 24px;" name="keysearch"
							value="Tìm Kiếm ..." type="text">
					</div>
					<div style="width: 19%; float: right;">
						<img alt="search" src="images/search.png" width="24" height="24"
							onclick="searchFull1();">
					</div>
					<SCRIPT type="text/javascript" src="js/searchfulltext1.js"></SCRIPT>

					<FORM id="search-form" method="post" action="fulltextsearch.action">
						<INPUT id="sortby" class="search-bar" name="sortby" value="0"
							type="hidden">
					</FORM>
				</DIV>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	function searchFull1() {
		var url = "fulltextsearchkey.action";
		var keysearch = jQuery('#lookup_input').val();
		jQuery.ajax({
			url : url,
			data : {
				keysearch : encodeURIComponent(keysearch)
			},
			success : function(data) {
				jQuery('#search-form').submit();
				
			}
		});
	}
	jQuery('#lookup_input').bind('keypress', function(e) {
		if(e.keyCode==13){
			searchFull1();
		}
	});
	</script>
	<img src="images/spacer.gif" width="1" height="56" alt="">
	<div id="contentmain">
		<form action="search.action" name="searchForm">
			<div id="boxsearch">
				<table width="100%" border="0" cellspacing="1" cellpadding="1">
					<tr>
						<td width="120px"><span class="tbdownlist1">Thành phố
						</span></td>
						<td width="120px"><span class="tbdownlist1">Quận/Huyện
						</span>
						</td>
						<td width="120px"><span class="tbdownlist1">Loại tin</span></td>
						<td width="120px"><span class="tbdownlist1">Diện tích
						</span></td>

						<td width="120px"><span class="tbdownlist1">Giá </span></td>
						<td width="120px" rowspan="2" valign="bottom"><a href="javascript:void(0);"
							class="searchButtonIndex" onclick="document.searchForm.submit();">Tìm
								Kiếm</a>
						</td>
						<td colspan="5"></td>
						<td></td>
					</tr>
					<tr>
						<td><span class="bghead"> <select name="city"
								id="city" class="tbdownlist">
									<option value="0">---Tất cả---</option>
									<s:iterator value="provinces" status="status">
										<option
											value="<s:property value="provinces[#status.index][0]" />">
											<s:property value="provinces[#status.index][1]" />
										</option>
									</s:iterator>
							</select> </span></td>
						<td><span class="bghead"> <select name="district"
								id="district" class="tbdownlist">
									<option value="0">---Tất cả---</option>
							</select> </span></td>
						<td><span class="bghead"> <select name="topictypeid"
								id="topictypeid" class="tbdownlist">
									<option selected value="0">---Tất cả---</option>
									<option value="1">Cho thuê</option>
									<option value="2">Chia sẻ</option>
							</select> </span></td>
						<td><span class="bghead"> <select name="area"
								id="area" class="tbdownlist">
									<option selected value="0">---Tất cả---</option>
									<option value="1"><15m2</option>
									<option value="2">15 - 20m2</option>
									<option value="3">20 - 30m2</option>
									<option value="4">>30m2</option>
							</select> </span></td>
						<td><span class="bghead"> <select name="price"
								id="price" class="tbdownlist">
									<option selected value="0">---Tất cả---</option>
									<option value="1"><2 triệu</option>
									<option value="2">2 - 4 triệu</option>
									<option value="3">4 - 6 triệu</option>
									<option value="4">> 6 triệu</option>
							</select> </span></td>
						<td colspan="3"><a href="inputfuzzy.action">Tìm kiếm gợi
								ý</a></td>
						<td width="6%"></td>
					</tr>

				</table>
			</div>
		</form>
		<table width="960px" border="0" cellspacing="0" cellpadding="0"
			style="margin: 0 auto;">
			<tr>
				<td width="249px" valign="top">
					<div class="leftcontent">
						<div id="minimap"></div>
						<div class="zoommap">
							<a class="modalbox" href="#inline1" onclick="initialize2()"
								style="font-size: 12px"><img
								src="images/icondetail_0002_map.png">Xem bản đồ lớn</a>
							<!-- hidden inline form -->
							<div id="inline1">
								<div id="map"></div>
							</div>
						</div>
						<div class="boxleftcontent" id="magincustom">
							<div class="fb-like" data-send="false" data-width="140"
								data-show-faces="false" data-font="tahoma"></div>
						</div>
						<div class="boxleftcontent" id="magincustom">
							<div class="filterheader">
								<div class="aligntextleft">Các tin cùng khu vực</div>
							</div>
							<s:iterator value="sameDistrict" status="status">
								<div id="recent">
									<div id="thumbimg">
										<img
											alt="<s:property value="sameDistrict[#status.index][0]" /> "
											src="Img/Topic/<s:property value="sameDistrict[#status.index][3]" /> "
											width="50" height="60">
									</div>
									<div id="s-info">
										<div id="title">
											<a id="a_title"
												href="detail.action?topicId=<s:property
											value="sameDistrict[#status.index][4]" />&districtId=<s:property
											value="sameDistrict[#status.index][5]" />"><s:property
													value="sameDistrict[#status.index][0]" /> </a>
										</div>
										<div id="address">
											<s:property value="sameDistrict[#status.index][1]" />
										</div>
										<div id="viewn">
											<div id="iconview">
												<img src="images/view.png" alt="" width="15" height="15">
											</div>
											<div id="numberview">
												<s:property value="sameDistrict[#status.index][2]" />
												Lượt xem
											</div>
										</div>
									</div>
								</div>
							</s:iterator>
						</div>

						<div class="boxleftcontent" id="magincustom">
							<div class="filterheader">
								<div class="aligntextleft">Các tin đã xem</div>
							</div>
							<s:iterator value="recentView" status="status1">
								<div id="recent">
									<div id="thumbimg">
										<img
											alt="<s:property value="recentView[#status1.index][0]" /> "
											src="Img/Topic/<s:property value="recentView[#status1.index][3]" /> "
											width="50" height="55">
									</div>
									<div id="s-info">
										<div id="title">
											<a id="a_title"
												href="detail.action?topicId=<s:property
											value="recentView[#status1.index][4]" />&districtId=<s:property
											value="recentView[#status1.index][5]" />"><s:property
													value="recentView[#status1.index][0]" /> </a>
										</div>
										<div id="address">
											<s:property value="recentView[#status1.index][1]" />
										</div>
										<div id="viewn">
											<div id="iconview">
												<img src="images/view.png" alt="" width="10" height="10">
											</div>
											<div id="numberview">
												<s:property value="recentView[#status1.index][2]" />
												Lượt xem
											</div>
										</div>
									</div>
								</div>
							</s:iterator>
						</div>
					</div></td>
				<td width="690px" valign="top">
					<div class="boxleftcontent" id="rightcontent">
						<div class="headerdetail">
							<div class="titledetail">
								<div class="titledetailcontent">${detailsList[0][0]}</div>
							</div>
							<div class="editdetail">
								<div class="icondetail">
									<c:choose>
										<c:when test="${isOwner==1 || isAdmin==1}">
											<c:choose>
												<c:when test="${detailsList[0][16]==1 }">
													<a href="checkedittopic.action?topicId=${topicId}"
														style="color: #FF0">[Sửa]</a>
												</c:when>
												<c:otherwise>
													<a href="checkeditsharetopic.action?topicId=${topicId}"
														style="color: #FF0">[Sửa]</a>
												</c:otherwise>
											</c:choose>
											<a href="javascript:void(0);" id="buttonconfirm2" style="color: #FF0">[Làm
												mới]</a>
											<div id="modal2">
												<div id="heading2">Bạn có chắc chắn muốn làm mới bài
													đăng này?</div>
												<div id="content2">
													<a style="text-align: left;"
														href="refresh.action?topicId=${topicId}"
														class="button1 green close"><img
														src="images/dialog/tick.png">Đồng ý</a> <a
														style="text-align: left;" href="javascript:void(0);"
														class="button1 red close"><img
														src="images/dialog/cross.png">Bỏ qua</a>
												</div>
											</div>
											<c:choose>
												<c:when test="${isHidden==0}">
													<a href="javascript:void(0);" id="buttonconfirm3" style="color: #FF0">[Ẩn]</a>
												</c:when>
											</c:choose>
											<div id="modal3">
												<div id="heading3">Bạn có chắc chắn muốn ẩn bài đăng
													này?</div>
												<div id="content3">
													<a style="text-align: left;"
														href="hidetopic.action?topicId=${topicId}"
														class="button1 green close"><img
														src="images/dialog/tick.png">Đồng ý</a> <a
														style="text-align: left;" href="javascript:void(0);"
														class="button1 red close"><img
														src="images/dialog/cross.png">Bỏ qua</a>
												</div>
											</div>
											<a href="javascript:void(0);" id="buttonconfirm" style="color: #FF0">[Xoá]</a>
											<div id="modal">
												<div id="heading1">Bạn có chắc chắn muốn xóa bài đăng
													này?</div>
												<div id="content1">
													<a style="text-align: left;"
														href="deletetopic.action?topicId=${topicId}"
														class="button1 green close"><img
														src="images/dialog/tick.png">Đồng ý</a> <a
														style="text-align: left;" href="javascript:void(0);"
														class="button1 red close"><img
														src="images/dialog/cross.png">Bỏ qua</a>
												</div>
											</div>
										</c:when>
									</c:choose>
								</div>
							</div>
						</div>
						<div class="detailcontent">
							<div class="shortinfo">
								<input type="hidden" value="${detailsList[0][12]}"
									id="latitude_" /> <input type="hidden"
									value="${detailsList[0][13]}" id="longitude_" /> <input
									type="hidden" value="${detailsList[0][0]}" id="title_" /> <input
									type="hidden" value="${detailsList[0][1]}" id="address_" /> <input
									type="hidden" value="${detailsList[0][14]}" id="image_" /> <input
									type="hidden" value="${detailsList[0][16]}" id="topictypeid_" />
								<div id="addresscus">
									Địa chỉ : <span style="color: #034B8A">${detailsList[0][1]}</span>
								</div>
								<div class="shortcontentl">
									<div id="infohouse">
										Giá: <span style="color: #034B8A">${detailsList[0][3]}
											triệu(vnđ)/tháng</span>
									</div>
									<div id="infohouse">
										Diện tích : <span style="color: #034B8A">${detailsList[0][2]}
											m2</span>
									</div>
									<c:choose>
										<c:when test="${detailsList[0][16]==1}">
											<div id="infohouse">
												Tiền nước: <span style="color: #034B8A">${detailsList[0][17]}
													nghìn vnđ/người/tháng</span>
											</div>
											<div id="infohouse">
												Tiền điện: <span style="color: #034B8A">${detailsList[0][18]}
													nghìn vnđ/1kwh</span>
											</div>
											<c:choose>
												<c:when test="${detailsList[0][26]==1}">
													<div id="infohouse">
														Nấu ăn: <span style="color: #034B8A">Trong phòng</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][26]==2}">
													<div id="infohouse">
														Nấu ăn: <span style="color: #034B8A">Bên ngoài</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Nấu ăn: <span style="color: #034B8A">Không cho phép</span>
													</div>
												</c:otherwise>
											</c:choose>

											<c:choose>
												<c:when test="${detailsList[0][19]==1}">
													<div id="infohouse">
														Vệ sinh: <span style="color: #034B8A">Riêng</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Vệ sinh: <span style="color: #034B8A">Chung</span>
													</div>
												</c:otherwise>
											</c:choose>
										</c:when>
										<c:otherwise>
											<div id="infohouse">
												Tiền nước: <span style="color: #034B8A">--</span>
											</div>
											<div id="infohouse">
												Tiền điện: <span style="color: #034B8A">--</span>
											</div>
											<div id="infohouse">
												Nấu ăn: <span style="color: #034B8A">--</span>
											</div>
											<c:choose>
												<c:when test="${detailsList[0][19]==1}">
													<div id="infohouse">
														Vệ sinh: <span style="color: #034B8A">Riêng</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Vệ sinh: <span style="color: #034B8A">Chung</span>
													</div>
												</c:otherwise>
											</c:choose>
										</c:otherwise>
									</c:choose>
									<img src="images/commenticon.png" width="30" height="30"
										alt="Comment"> <span style="color: #034B8A"><a
										data-href="detail.action?topicId=${topicId}"
										class="fb-comments-count" style="color: #034B8A">0</a> </span> bình
									luận <img src="images/icondetail_0001_view.png" width="24"
										height="21" alt="view"> <span style="color: #034B8A">${detailsList[0][6]}</span>
									: lượt xem


								</div>
								<div class="shortcontentl">
									<c:choose>
										<c:when test="${detailsList[0][16]==1}">
											<c:choose>
												<c:when test="${detailsList[0][20]==1}">
													<div id="infohouse">
														Internet: <span style="color: #034B8A">Có</span>
													</div>
												</c:when>

												<c:otherwise>
													<div id="infohouse">
														Internet: <span style="color: #034B8A">Không</span>
													</div>
												</c:otherwise>
											</c:choose>
											<c:choose>
												<c:when test="${detailsList[0][21]==1}">
													<div id="infohouse">
														Loại nhà:<span style="color: #034B8A">Không chung
															chủ</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Loại nhà: <span style="color: #034B8A">Ở cùng chủ
															nhà</span>
													</div>
												</c:otherwise>
											</c:choose>

											<c:choose>
												<c:when test="${detailsList[0][22]==1}">
													<div id="infohouse">
														Chỗ để xe máy:<span style="color: #034B8A">Miễn phí</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][22]==2}">
													<div id="infohouse">
														Chỗ để xe máy:<span style="color: #034B8A">Có
															${detailsList[0][23]}k/tháng</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Chỗ để xe máy: <span style="color: #034B8A">Không</span>
													</div>
												</c:otherwise>
											</c:choose>
											<c:choose>
												<c:when test="${detailsList[0][24]=='10h'}">
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">10h</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][24]=='10h30'}">
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">10h30</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][24]=='11h'}">
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">11h</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][24]=='11h30'}">
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">11h30</span>
													</div>
												</c:when>
												<c:when test="${detailsList[0][24]=='12h'}">
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">12h</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Giờ đóng cửa: <span style="color: #034B8A">Tự do</span>
													</div>
												</c:otherwise>
											</c:choose>

											<div id="infohouse">
												Liên hệ : <span style="color: #034B8A">${detailsList[0][4]}</span>
											</div>
											<div id="infohouse">
												Số điện thoại : <span style="color: #034B8A">${detailsList[0][5]}</span>
											</div>

											<c:choose>
												<c:when test="${detailsList[0][25]==1}">
													<span
														style="padding-top: 50px; font: bold 15px Verdana, Geneva, sans-serif; color: #F00">Chính
														chủ</span>
												</c:when>

												<c:otherwise>
													<span
														style="padding-top: 50px; font: bold 15px Verdana, Geneva, sans-serif; color: #F00">Trung
														gian</span>
												</c:otherwise>
											</c:choose>
										</c:when>
										<c:otherwise>
											<div id="infohouse">
												Internet: <span style="color: #034B8A">--</span>
											</div>
											<c:choose>
												<c:when test="${detailsList[0][21]==1}">
													<div id="infohouse">
														Loại nhà:<span style="color: #034B8A">Không chung
															chủ</span>
													</div>
												</c:when>
												<c:otherwise>
													<div id="infohouse">
														Loại nhà: <span style="color: #034B8A">Ở cùng chủ
															nhà</span>
													</div>
												</c:otherwise>
											</c:choose>
											<div id="infohouse">
												Chỗ để xe máy: <span style="color: #034B8A">--</span>
											</div>
											<div id="infohouse">
												Giờ đóng cửa: <span style="color: #034B8A">--</span>
											</div>
											<div id="infohouse">
												Liên hệ : <span style="color: #034B8A">${detailsList[0][4]}</span>
											</div>
											<div id="infohouse">
												Số điện thoại : <span style="color: #034B8A">${detailsList[0][5]}</span>
											</div>
											<span
												style="padding-top: 50px; font: bold 15px Verdana, Geneva, sans-serif; color: #F00"></span>
										</c:otherwise>
									</c:choose>
								</div>
							</div>
							<script type="text/javascript">
								function checklogin() {
									var username = document
											.getElementById("usernamehidden").value;
									if (username == '') {
										// Button which will activate our modal
										jQuery('#modal5').reveal({ // The item which will be opened with reveal
											animation : 'fade', // fade, fadeAndPop, none
											animationspeed : 300, // how fast animtions are
											closeonbackgroundclick : true, // if you click background will modal close?
											dismissmodalclass : 'close' // the class of a button or element that will close an open modal
										});
										return false;

									} else {
										var topic_id=document.getElementById("topicId").value;
										AddFavorite(topic_id);
									}
								}

								function checklogin1() {
									var username = document
											.getElementById("usernamehidden").value;
									if (username == '') {
										// Button which will activate our modal
										jQuery('#modal5').reveal({ // The item which will be opened with reveal
											animation : 'fade', // fade, fadeAndPop, none
											animationspeed : 300, // how fast animtions are
											closeonbackgroundclick : true, // if you click background will modal close?
											dismissmodalclass : 'close' // the class of a button or element that will close an open modal
										});
										return false;

									} else {
										var topic_id=document.getElementById("topicId").value;
										var point = jQuery('#rateit6').rateit(
												'value');
										jQuery('#rateValue').val(point);
										AddRate(topic_id,point);
									}
								}
							</script>
							<form action="addfavorite" name="addfavorite">
								<input type="hidden" id="topicId" name="topicId"
									value="${topicId}"> <input type="hidden"
									name="districtId" value="${districtId}">
							</form>

							<div class="vote">

								<c:choose>
									<c:when test="${exitFV==0}">
										<div id="fv_message"
											style="float: left; width: 150px; color: blue; padding-left: 5px">
											<a href="javascript:void(0);" onclick="checklogin()"> <img
												src="images/icondetail_0000_heart.png" alt="yêu thích">Thêm
												vào yêu thích </a>
										</div>
									</c:when>
									<c:otherwise>
										<div id="fv_message"
											style="float: left; width: 150px; color: blue; padding-left: 5px">
											Đã có trong yêu thích</a>
										</div>
									</c:otherwise>
								</c:choose>
								<div id="modal5">
									<div id="heading5">Thông báo !</div>
									<div id="content5">
										<p style="text-align: left; padding-left: 10px;">Bạn cần
											đăng nhập để sử dụng chức năng này</p>
										<p style="text-align: left; padding-left: 10px;">Đăng nhập
											với tài khoản của Facebook</p>
										<a style="text-align: left;" href="javascript:void(0);"
											onclick="getcurrenturlvalue();" class="button green close"><img
											src="images/dialog/tick.png">Đăng nhập</a> <a
											style="text-align: left;" href="javascript:void(0);" class="button red close"><img
											src="images/dialog/cross.png">Đóng</a>
									</div>
								</div>
								<div class="showvote">
									<span style="color: #034B8A" id="score"><s:property
											value="rate[0][0]" /> </span>điểm / <span style="color: #034B8A"
										id="times"><s:property value="rate[0][1]" /> </span> lượt
									đánh giá
								</div>
								<div class="votebar">
									<input type="range"
										value="<s:property
										value="rate[0][0]" />" step="1"
										id="backing4">
									<form action="addRate" name="addRate">
										<input type="hidden" name="topicId" value="${topicId}">
										<input type="hidden" name="districtId" value="${districtId}">
										<input type="hidden" name="rateValue" id="rateValue">
									</form>
									<div class="rateit" id="rateit6"
										data-rateit-backingfld="#backing4"
										data-rateit-resetable="false" data-rateit-ispreset="true"
										data-rateit-min="0" data-rateit-max="5"
										onclick="checklogin1()"></div>
								</div>
							</div>
							<div class="fullinfo">
								<h2 class="headerbolder">Thông tin thêm :</h2>
								<div class="descriptioncontent">${detailsList[0][7]}</div>
							</div>
							<div class="imgshow">
								<h2 class="headerbolder">Ảnh phòng trọ :</h2>
								<div>
									<div id="gallery_container">
										<div id="thumb_container">
											<div id="thumbs">
												<s:iterator value="images" status="status">
													<a
														href="Img/Topic/<s:property value="images[#status.index][2]" />"
														rel="lightbox[galerie]" target="_blank"><img
														src="Img/Topic/<s:property value="images[#status.index][2]" />"
														width="100" height="100" /> </a>
												</s:iterator>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div
								style="font: 12px Arial; color: #000; margin-right: 15px; text-align: right">
								Tạo bởi: <a href="viewuserprofile?user_Id=${detailsList[0][27]}"><span
									style="color: #034B8A">${detailsList[0][8]}</span> </a><br>
								Ngày tạo:<span style="color: #034B8A">${fn:substring(detailsList[0][9],0,16)}</span>
								Sửa lần cuối:<span style="color: #034B8A">${fn:substring(detailsList[0][10],0,16)}</span><br>
							</div>
							<div class="reportdetail">
								<a href="javascript:void(0);" id="compare_"
									style="font: 14px Arial; color: #04b732"
									onclick="ajaxComapre(${detailsList[0][15]})">[Thêm vào so
									sánh] </a> <a href="javascript:void(0);" onclick="checklogin4()"
									style="font: 14px Arial; color: #f90000">[Báo cáo bài đăng]
								</a>
								<script type="text/javascript">
									function checklogin4() {
										var username = document
												.getElementById("usernamehidden").value;
										if (username == '') {
											// Button which will activate our modal
											jQuery('#modal5').reveal({ // The item which will be opened with reveal
												animation : 'fade', // fade, fadeAndPop, none
												animationspeed : 300, // how fast animtions are
												closeonbackgroundclick : true, // if you click background will modal close?
												dismissmodalclass : 'close' // the class of a button or element that will close an open modal
											});
											return false;

										} else {
											// Button which will activate our modal
											jQuery('#modal4').reveal({ // The item which will be opened with reveal
												animation : 'fade', // fade, fadeAndPop, none
												animationspeed : 300, // how fast animtions are
												closeonbackgroundclick : true, // if you click background will modal close?
												dismissmodalclass : 'close' // the class of a button or element that will close an open modal
											});
											return false;

										}
									}
								</script>
								<div id="modal4">
									<div id="heading4">Báo cáo bài đăng</div>
									<div id="content4">
										<form action="reportspam" name="reportspam" method="post">
											<p style="text-align: left; padding-left: 10px;">Nhập nội
												dung báo cáo để giúp ban quản trị quản lý tốt hơn (vd: nhà
												này đã được thuê, spam, bị trùng...).</p>
											<textarea name="spamdescreption" id="spamdescreption" style="padding-left: 10px; margin-left: 10px;" rows="10" cols="55"></textarea>
											<a style="text-align: left;" href="javascript:void(0);" class="button1 green close" onclick="reportspam21();">
											<img src="images/dialog/tick.png">Báo cáo</a> 
											<a style="text-align: left;" href="javascript:void(0);" class="button1 red close">
											<img src="images/dialog/cross.png">Bỏ qua</a> 
											<input type="hidden" id="topicId" name="topicId" value="${topicId}"> 
											<input type="hidden" id="districtId" name="districtId" value="${districtId}">
										</form>
									</div>
								</div>
							</div>
							<div class="comment">
								<h2 class="headerbolder">Bình luận :</h2>
								<div id="fb-root"></div>
								<script>
									(function(d, s, id) {
										var js, fjs = d.getElementsByTagName(s)[0];
										if (d.getElementById(id))
											return;
										js = d.createElement(s);
										js.id = id;
										js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=418620964854308";
										fjs.parentNode.insertBefore(js, fjs);
									}(document, 'script', 'facebook-jssdk'));
								</script>
								<div class="fb-comments"
									data-href="detail.action?topicId=${topicId}"
									data-num-posts="10" data-width="650" fb-xfbml-state="rendered"></div>
							</div>
						</div>

					</div>
				</td>
				<td width="22">
			</tr>
			<tr>
				<td colspan="2">
					<div id="footercus" style="text-align: center; font-size: 12px;">
						<em>Designed by FU team | Powered by Struts<br>
							khutro.net</em>

					</div>
				</td>
			</tr>
		</table>
	</div>
	<div class="hiden_value">
		<display:table id="universitiesList" name="universitiesList"
			requestURI="/index.action" offset="1">
			<display:column>
				<input type="hidden" value="${universitiesList_rowNum}"
					id="Hidden_universitiesList" />
				<input type="hidden" value="${universitiesList[0]}"
					id="locationname${universitiesList_rowNum}" />
				<input type="hidden" value="${universitiesList[1]}"
					id="description${universitiesList_rowNum}" />
				<input type="hidden" value="${universitiesList[2]}"
					id="latitude${universitiesList_rowNum}" />
				<input type="hidden" value="${universitiesList[3]}"
					id="longitude${universitiesList_rowNum}" />
			</display:column>
		</display:table>
		<display:table id="markertsList" name="markertsList"
			requestURI="/index.action" offset="1">
			<display:column>
				<input type="hidden" value="${markertsList_rowNum}"
					id="Hidden_markertsList" />
				<input type="hidden" value="${markertsList[0]}"
					id="locationname1${markertsList_rowNum}" />
				<input type="hidden" value="${markertsList[1]}"
					id="description1${markertsList_rowNum}" />
				<input type="hidden" value="${markertsList[2]}"
					id="latitude1${markertsList_rowNum}" />
				<input type="hidden" value="${markertsList[3]}"
					id="longitude1${markertsList_rowNum}" />
			</display:column>
		</display:table>
		<display:table id="parksList" name="parksList"
			requestURI="/index.action" offset="1">
			<display:column>
				<input type="hidden" value="${parksList_rowNum}"
					id="Hidden_parksList" />
				<input type="hidden" value="${parksList[0]}"
					id="locationname2${parksList_rowNum}" />
				<input type="hidden" value="${parksList[1]}"
					id="description2${parksList_rowNum}" />
				<input type="hidden" value="${parksList[2]}"
					id="latitude2${parksList_rowNum}" />
				<input type="hidden" value="${parksList[3]}"
					id="longitude2${parksList_rowNum}" />
			</display:column>
		</display:table>
		<display:table id="busList" name="busList" requestURI="/index.action"
			offset="1">
			<display:column>
				<input type="hidden" value="${busList_rowNum}" id="Hidden_busList" />
				<input type="hidden" value="${busList[0]}"
					id="locationname3${busList_rowNum}" />
				<input type="hidden" value="${busList[1]}"
					id="description3${busList_rowNum}" />
				<input type="hidden" value="${busList[2]}"
					id="latitude3${busList_rowNum}" />
				<input type="hidden" value="${busList[3]}"
					id="longitude3${busList_rowNum}" />
			</display:column>
		</display:table>
	</div>
	<div style="display: none;" class="nav_up" id="nav_up"></div>
	<div style="display: none;" class="nav_down" id="nav_down"></div>
	<script>
		jQuery(function($) {
			var $elem = $('#contentmain');

			jQuery('#nav_up').fadeIn('slow');
			jQuery('#nav_down').fadeIn('slow');

			jQuery(window).bind('scrollstart', function() {
				$('#nav_up,#nav_down').stop().animate({
					'opacity' : '0.2'
				});
			});
			jQuery(window).bind('scrollstop', function() {
				$('#nav_up,#nav_down').stop().animate({
					'opacity' : '1'
				});
			});

			jQuery('#nav_down').click(function(e) {
				$('html, body').animate({
					scrollTop : $elem.height()
				}, 800);
			});
			jQuery('#nav_up').click(function(e) {
				$('html, body').animate({
					scrollTop : '0px'
				}, 800);
			});
		});
	</script>
	<!-- End Save for Web Slices -->
</body>
</html>